﻿@using Kovan.Model.Entity.Config;
@{
    var item = ViewBag.PicGroup as tb_picgroup;
    var pgid = item.picgroup_id;
    var pgUkey = item.ukey;
    var name = item.name;
}
<style type="text/css" media="screen">
    .my-uploadify-button
    {
        background: none;
        border: none;
        text-shadow: none;
        border-radius: 0;
    }
    .uploadify:hover .my-uploadify-button
    {
        background: none;
        border: none;
    }
    
    .fileQueue
    {
        width: 450px;
        height: 150px;
        overflow: auto;
        border: 1px solid #E5E5E5;
        margin-bottom: 10px;
    }
</style>
<script type="text/javascript">
    $(function () {
        $('#testFileInput2').uploadify({
            'swf': '@Url.Content("~/content/js/uploadify/uploadify.swf")',
            'uploader': '@Url.Content("~/PicGroup/UploadPic")',
            'formData': { PicGroupID: '@pgid', PicGroupUkey: '@pgUkey' },
            'queueID': 'fileQueue',
            'buttonImage': '@Url.Content("~/content/js/uploadify/add.jpg")',
            'buttonClass': 'my-uploadify-button',
            'width': 102,
            'auto': false,
            'fileTypeExts':'*.jpg;*.gif;*.png;*.bmp;*.jpeg',
            'onQueueComplete': function (queueData) {
                $.pdialog.closeCurrent();
                $.pdialog.open("@Url.Content("~/Manage/PicGroup/Picture?picgroupId=" + pgid)", "picgroup_upload", "@name", { max:true });
            }
        });
    });
</script>
<div class="pageContent" style="padding: 10px;" layouth="20">
    <input id="testFileInput2" type="file" name="image2" />
    <div id="fileQueue" class="fileQueue">
    </div>
    <input type="image" src="@Url.Content("~/content/js/uploadify/upload.jpg")" onclick="$('#testFileInput2').uploadify('upload', '*');" />
    <input type="hidden" id="testaa" value="" />
</div>
